package cn.dlc.com.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 邓立川
 * @date 2021/11/21 9:58
 * @desc spring核心配置类
 */
@Configuration
@ComponentScan(basePackages = "cn.dlc.com",
        // 排除添加了RestController和Controller注解的类
        excludeFilters = {
        @ComponentScan.Filter(type = FilterType.ANNOTATION,value = RestController.class),
        @ComponentScan.Filter(type = FilterType.ANNOTATION, value = Controller.class)} )
public class SpringConfig {
    // 配置数据库连接池，事务管理器等等。
}
